Just testing the Hadoop program, accidentally deleted the data ~ ~ ~ ~ well is on the test machine, or the egg pain, or set up a Hadoop Recycle Bin, just in case
First of all:
The Hadoop Recycle Bin is trash and is closed by default.
Accustomed to the window of the classmate, suggest that it is best to open it ahead of
Trash of the hadoop recycle bin is disabled by default.If you are used to window, it is recommended that you open it in advance. Otherwise, you may need to cry in case of misoperations.
1. Modify CONF/core-site.xml, add
Property > Name > FS. Trash. Interval Name > Value > 1440 Value > Description > Number of minutes between
SSH Skeleton Code:Public String Delerubbishad () {int deleadcount = 0;RUBBISHADTP = CONFIGDAO.RUBBISHADTP ();Collection of ad images in the databasemapFile Adfile = new file ("C://program Files//apache software foundation//tomcat 6.0//webapps//plpwmanagers// Yesilovepjustdoit2014//adimg ");String adarray[];Adarray=adfile.list ();An array of ad images on the server, since the IE storage mechanism, the resulting files from the server are included with a thumbs.db thumbnail file. No need to deal wi
Org. apache. hadoop. IPC. remoteException: Org. apache. hadoop. HDFS. server. namenode. safemodeexception: cannot delete/tmp/hadoop/mapred/system. name node is in safe mode.
The ratio of reported blocks 0.7857 has not reached the threshold 0.9990. Safe mode will be turned off automatically.
At org. Apache.
ArticleDirectory
Insecure
Secure Mode
No downtime is required for adding or deleting machines in the hadoop cluster, and the entire service is not interrupted.
Before this operation, the hadoop cluster is as follows:
HDFS machines are as follows:
The MR machine is as follows:
Add Machine
On the master machine of the cluster, modify the $ hadoop_home/CONF/slaves file and add t
Add, delete, and delete nodes in Hadoop. 1. Modify host as normal datanode. Add namenode ip2. modify namenode configuration file confslaves add ip or host3. on the machine of the new node, start the service [root @ slave-004hadoop] #. binhadoop-daemon.shstartdatanode [root @ slav
Add, delete, and
to view the PID and process name of the Java process on the machine.1.2 Delete Extreme is not recommended directly on the slave by:hadoop-daemon.sh Stop Datanodecommand to turn off Datanode. This causes the missing block to appear in HDFs.1. Change datanode-deny.list on Master to join the corresponding machine2, refresh the node configuration on master:Hadoop dfsadmin-refreshnodesAt this point in the Web UI you can immediately see that the node becom
HDFs Add Delete nodes and perform HDFs balance
Mode 1: Static add Datanode, stop Namenode mode
1. Stop Namenode
2. Modify the slaves file and update to each node
3. Start Namenode
4. Execute the Hadoop balance command. (This is used for the balance cluster and is not required if you are just adding a node)
-----------------------------------------
Mode 2: Dynamically add Datanode, keep Namenode way
When running a Hadoop program, the output directory specified by the program (such as output) cannot be present to prevent overwriting the result, otherwise an error is prompted, so the output directory needs to be deleted before running. When you actually develop your application, consider adding the following code to your program to automatically delete the output directory each time you run it, avoiding
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.